#include "fxcc/core/graph/common/CameraData.h"

using namespace fxcc::graph::common;

fxcc::graph::common::CameraData::CameraData(aiCamera* camera)
{
    Load(camera->mName, m_Name);
    Load(camera->mPosition, m_Position);
    Load(camera->mUp, m_Up);
    Load(camera->mLookAt, m_LookAt);
    m_ProjData.m_HorizontalFOV = glm::degrees(camera->mHorizontalFOV);
    m_ProjData.m_ClipPlaneNear = camera->mClipPlaneNear;
    m_ProjData.m_ClipPlaneFar = camera->mClipPlaneFar;
    m_ProjData.m_Aspect = camera->mAspect;
    m_ProjData.m_OrthographicWidth = camera->mOrthographicWidth;
    m_ProjData.m_OrthographicHeight = camera->mOrthographicWidth / camera->mAspect;

}
